package com.lswms.modules.lswms.entity.orders;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.lswms.common.entity.LswmsBaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

/**
 * 出库明细
 *
 * @author DX sunlightcs@gmail.com
 * @since 1.0.0 2021-06-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("lswms_orderdetail")
public class OrderdetailEntity extends LswmsBaseEntity {
	private static final long serialVersionUID = 1L;

	/**
	 * 出库单号
	 */
	@TableField(value = "orderkey")
	private String orderkey;
	/**
	 * 行号
	 */
	@TableField(value = "line")
	private Integer line;
	/**
	 * 商品编码
	 */
	@TableField(value = "sku")
	private String sku;
	/**
	 * 单位
	 */
	@TableField(value = "unit")
	private String unit;
	/**
	 * 包装
	 */
	@TableField(value = "pack")
	private String pack;
	/**
	 * 状态
	 */
	@TableField(value = "status")
	private Integer status;
	/**
	 * 预计数量
	 */
	@TableField(value = "qty")
	private BigDecimal qty;
	/**
	 * 剩余数量
	 */
	@TableField(value = "diffqty")
	private BigDecimal diffqty;
	/**
	 * 分配量
	 */
	@TableField(value = "allocateqty")
	private BigDecimal allocateqty;
	/**
	 * 拣货量
	 */
	@TableField(value = "pickqty")
	private BigDecimal pickqty;
	/**
	 * 实际数量
	 */
	@TableField(value = "actqty")
	private BigDecimal actqty;
	/**
	 * 自库位
	 */
	@TableField(value = "fromloc")
	private String fromloc;
	/**
	 * 自托盘
	 */
	@TableField(value = "fromtray")
	private String fromtray;
	/**
	 * 自容器
	 */
	@TableField(value = "frombox")
	private String frombox;
	/**
	 * 批号
	 */
	@TableField(value = "lot")
	private String lot;
	/**
	 * 生产日期
	 */
	@TableField(value = "lot1")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	private Date lot1;
	/**
	 * 有效日期
	 */
	@TableField(value = "lot2")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	private Date lot2;
	/**
	 * 属性3
	 */
	@TableField(value = "lot3")
	private String lot3;
	/**
	 * 属性4
	 */
	@TableField(value = "lot4")
	private String lot4;
	/**
	 * 属性5
	 */
	@TableField(value = "lot5")
	private String lot5;
	/**
	 * 属性6
	 */
	@TableField(value = "lot6")
	private String lot6;
	/**
	 * 属性7
	 */
	@TableField(value = "lot7")
	private String lot7;
	/**
	 * 属性8
	 */
	@TableField(value = "lot8")
	private String lot8;
	/**
	 * 属性9
	 */
	@TableField(value = "lot9")
	private String lot9;
	/**
	 * 属性10
	 */
	@TableField(value = "lot10")
	private String lot10;
	/**
	 * 属性11
	 */
	@TableField(value = "lot11")
	private String lot11;
	/**
	 * 属性12
	 */
	@TableField(value = "lot12")
	private String lot12;
	/**
	 * 属性13
	 */
	@TableField(value = "lot13")
	private String lot13;
	/**
	 * 属性14
	 */
	@TableField(value = "lot14")
	private String lot14;
	/**
	 * 属性15
	 */
	@TableField(value = "lot15")
	private String lot15;
	/**
	 * 分配策略
	 */
	@TableField(value = "allocationstrategy")
	private String allocationstrategy;
	/**
	 * 周转
	 */
	@TableField(value = "rolateby")
	private String rolateby;
	/**
	 * 备注
	 */
	@TableField(value = "remark")
	private String remark;
	/**
	 * 来源单号
	 */
	@TableField(value = "sourcekey")
	private String sourcekey;
	/**
	 * 来源单类型
	 */
	@TableField(value = "sourcetype")
	private String sourcetype;
	/**
	 * 来源单时间
	 */
	@TableField(value = "sourcedate")
	private Date sourcedate;
	/**
	 * 关联单据
	 */
	@TableField(value = "relatedorderkey")
	private String relatedorderkey;
	/**
	 * 关联单据行
	 */
	@TableField(value = "relatedorderline")
	private Integer relatedorderline;
	/**
	 * 回传状态
	 */
	@TableField(value = "backstatus")
	private String backstatus;
	/**
	 * 回传时间
	 */
	@TableField(value = "backdate")
	private Date backdate;
	/**
	 * 回传结果
	 */
	@TableField(value = "backresult")
	private String backresult;
	/**
	 * 回传码
	 */
	@TableField(value = "backcode")
	private String backcode;
	/**
	 * 仓库
	 */
	@TableField(value = "warehouse")
	private String warehouse;

	@TableField(exist = false)
	private String statusstr;

	@TableField(exist = false)
	private String descr;

	@TableField(exist = false)
	private String factorycdoe;
	
	@TableField(exist = false)
	private String rolatebystr;

	@TableField(exist = false)
	private String strategyname;

}